<?php

	require_once('../includes/config.php');
	require_once('../includes/functions.php');
	
	unset($_SESSION[$SELECTED_USER_ID]);
	
	// Retrieve base HTML
	$pageStr = buildStandardPage('Access Denied','Access Denied');
	
	$content = '';
	
	if(isMobile()){
		$content .= 'Detected Mobile!';
	}
	else{
		/**
		 * Tailor the content displayed to the type of user that is viewing the page
		 * Administrator vs standard logged in user vs non-logged in user
		 */	
		if(true == isAdmin() || true == isBankManager()){
			$pageStr = buildStandardPage('All Users','All Users');
			$content .= makeUserNavBar();
			$content .= '<center>';				
			$content .= buildUserTable();
			$content .= '</center>';	
		}
		else{
			$content .= $MUST_BE_BANK_EMPLOYEE;
		}
	}
	$pageStr = str_Replace('<!--content-->', $content, $pageStr);

	/**
	 * Send the generated HTML to the client's browser
	 */
	echo $pageStr;
?>